<?php

	if(isset($_POST['emailSender'])): ////////// send email 
	ob_start();
?>
<div style="width:100%">
	<div class="logo-header <?php if ( !get_option('unspoken_logo_top') && !get_option('unspoken_logo_text') ) echo 'offset' ?>">
                        <a href="<?php bloginfo( 'url' ); ?>">
                        <?php
                            if ( get_option('unspoken_logo_text') ) {
                                echo get_option('unspoken_logo_text');
                            } elseif ( get_option('unspoken_logo_top') ) {
                                if ( function_exists('unspoken_get_logo') ) echo unspoken_get_logo(get_option('unspoken_logo_top'));
                            } else {
                            ?>
                                <?php
                                if (get_option('unspoken_skin') && get_option('unspoken_skin') != 'default') {
                                    echo '<span style="background: url(' . get_bloginfo('template_url') .
										 '/skins/unspoken-' . get_option('unspoken_skin') . '/images/logo-header.png) 0 0 no-repeat;"></span>';
                                } else {
                                    echo '<span style="background: url(' . get_bloginfo('template_url') . '/images/logo-header.png) 0 0 no-repeat;"></span>';
                                }
                                ?>
                            <?php } ?>
                        </a>
    </div>
    <div style="clear:both; float:none; font-family:font-family:Verdana; font-size:14px;">
        Hi, <br />
        <p>You have a message from <strong><?php echo $_POST['fullname'] ?></strong></p><br />
        <p><strong>Message:</strong> <?php echo $_POST['message'] ?></p><br /><br />
        Thanks<br />
        Team <?php bloginfo( 'url' ); ?>
    </div>
</div>
<?php 
	$body = ob_get_contents();
	ob_end_clean();
		include(dirname(__FILE__)."/lib/class.MailSender.php");
		$email = new MyMailer();
		$email->From("StoneSelector <sales@stoneselector.com>");
		//$email->To("ceo@najeebmedia.com");
		$email->To($emailAddress);
		$email->Subject("Message from Stoneselector");
		$email->Message($body, true);
		$rs= $email->SendMail();	
		if($rs) $cmd="Email Successfully Sent!"; else $cmd="";
	endif;
?>